package org.absolutezero.client.events;

import org.absolutezero.shared.RecipeProxy;

import com.google.gwt.event.shared.GwtEvent;

public class ViewRecipeEvent extends GwtEvent<ViewRecipeEventHandler> {

	public static Type<ViewRecipeEventHandler> TYPE = new Type<ViewRecipeEventHandler>();
	
	private RecipeProxy recipe;
	
	public ViewRecipeEvent(RecipeProxy recipe){
		this.recipe = recipe;
	}
	
	public RecipeProxy getRecipe(){
		return recipe;
	}
	
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ViewRecipeEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ViewRecipeEventHandler handler) {
		handler.onEvent(this);
	}

}
